<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>slibc: slibc/stdio_templates_.hpp File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">slibc
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_4d4a740b65ecc1faa3510c186d2f00c5.html">slibc</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">stdio_templates_.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains overloaded templates for some _s-functions defined in <a class="el" href="stdio_8h.html" title="Contains those _s-functions that are related to stdio.">stdio.h</a>.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="stdio_8h_source.html">./stdio.h</a>&quot;</code><br/>
<code>#include &lt;stdarg.h&gt;</code><br/>
</div>
<p><a href="stdio__templates___8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;rsize_t n&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="stdio__templates___8hpp.html#a38b68ddc37d97863a3e6a3cb62a2c082">sprintf_s</a> (char(&amp;s1)[n], const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function provides for fomatted output into buffer <em>s</em> while taking into account the size of s.  <a href="#a38b68ddc37d97863a3e6a3cb62a2c082"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;rsize_t n&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="stdio__templates___8hpp.html#ad0c89f9e0392dc9c6158ccd6ee6c3261">snprintf_s</a> (char(&amp;s1)[n], const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function provides for fomatted output into buffer <em>s</em> while taking into account the size of s.  <a href="#ad0c89f9e0392dc9c6158ccd6ee6c3261"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Contains overloaded templates for some _s-functions defined in <a class="el" href="stdio_8h.html" title="Contains those _s-functions that are related to stdio.">stdio.h</a>. </p>
<p>Usage of these templates is only possible in C++. For more information please consult the documentation in <a class="el" href="string__templates___8hpp.html" title="Contains overloaded templates for some _s-functions defined in string.h.">string_templates_.hpp</a> </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="ad0c89f9e0392dc9c6158ccd6ee6c3261"></a><!-- doxytag: member="stdio_templates_.hpp::snprintf_s" ref="ad0c89f9e0392dc9c6158ccd6ee6c3261" args="(char(&amp;s1)[n], const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;rsize_t n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio__templates___8hpp.html#ad0c89f9e0392dc9c6158ccd6ee6c3261">snprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char(&amp;)&#160;</td>
          <td class="paramname"><em>s1</em>[n], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function provides for fomatted output into buffer <em>s</em> while taking into account the size of s. </p>
<p>For statically allocated destination buffers this C++ template function automatically deducts <em>snprintf'</em> size argument <em>n</em>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s1</td><td>The destination buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>variable amount of parameters which are treated according to the specified format string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters that would have been written (not counting the null byte) had s1 been sufficiently large a negative number in case of an encoding error 0 in case of runtime-constraint violation </dd></dl>

<p>References <a class="el" href="stdio_8h.html#acebd989cc77ba725898eeab88bb5c83e">vsnprintf_s()</a>.</p>

</div>
</div>
<a class="anchor" id="a38b68ddc37d97863a3e6a3cb62a2c082"></a><!-- doxytag: member="stdio_templates_.hpp::sprintf_s" ref="a38b68ddc37d97863a3e6a3cb62a2c082" args="(char(&amp;s1)[n], const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;rsize_t n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio__templates___8hpp.html#a38b68ddc37d97863a3e6a3cb62a2c082">sprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char(&amp;)&#160;</td>
          <td class="paramname"><em>s1</em>[n], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function provides for fomatted output into buffer <em>s</em> while taking into account the size of s. </p>
<p>For statically allocated destination buffers this C++ template function automatically deducts <em>sprintf'</em> size argument <em>n</em>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s1</td><td>The destination buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>variable amount of parameters which are treated according to the specified format string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written (not counting the null byte) a negative number in case of an encoding error 0 in case of runtime-constraint violation </dd></dl>

<p>References <a class="el" href="stdio_8h.html#a3ff3ddc4dfd8d6853dda4441b8fdf2bc">vsprintf_s()</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 31 2012 13:48:20 for slibc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
